package cn.iocoder.yudao.module.crossborder.order.enums;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;

/**
 * CrossBorder Order 错误码枚举类
 *
 * crossborder order 系统，使用 1-025-000-000 段
 */
public interface ErrorCodeConstants {

    // ========== 订单管理相关 1-025-001-000 ============
    ErrorCode ORDER_NOT_EXISTS = new ErrorCode(1_025_001_000, "订单不存在");
    ErrorCode ORDER_ALREADY_EXISTS = new ErrorCode(1_025_001_001, "订单已存在");
    ErrorCode ORDER_STATUS_INVALID = new ErrorCode(1_025_001_002, "订单状态无效");
    ErrorCode ORDER_AMOUNT_INVALID = new ErrorCode(1_025_001_003, "订单金额无效");

    // ========== 订单项相关 1-025-002-000 ============
    ErrorCode ORDER_ITEM_NOT_EXISTS = new ErrorCode(1_025_002_000, "订单项不存在");
    ErrorCode ORDER_ITEM_QUANTITY_INVALID = new ErrorCode(1_025_002_001, "订单项数量无效");
    ErrorCode ORDER_ITEM_PRICE_INVALID = new ErrorCode(1_025_002_002, "订单项价格无效");
    ErrorCode ORDER_ITEM_PRODUCT_INVALID = new ErrorCode(1_025_002_003, "订单项商品无效");

    // ========== 订单支付相关 1-025-003-000 ============
    ErrorCode ORDER_PAYMENT_NOT_EXISTS = new ErrorCode(1_025_003_000, "订单支付记录不存在");
    ErrorCode ORDER_PAYMENT_STATUS_INVALID = new ErrorCode(1_025_003_001, "订单支付状态无效");
    ErrorCode ORDER_PAYMENT_AMOUNT_MISMATCH = new ErrorCode(1_025_003_002, "订单支付金额不匹配");
    ErrorCode ORDER_PAYMENT_EXPIRED = new ErrorCode(1_025_003_003, "订单支付已过期");

    // ========== 订单履约相关 1-025-004-000 ============
    ErrorCode ORDER_FULFILLMENT_NOT_EXISTS = new ErrorCode(1_025_004_000, "订单履约记录不存在");
    ErrorCode ORDER_FULFILLMENT_STATUS_INVALID = new ErrorCode(1_025_004_001, "订单履约状态无效");
    ErrorCode ORDER_FULFILLMENT_FAILED = new ErrorCode(1_025_004_002, "订单履约失败");
    ErrorCode ORDER_INVENTORY_INSUFFICIENT = new ErrorCode(1_025_004_003, "订单库存不足");

    // ========== 订单售后相关 1-025-005-000 ============
    ErrorCode ORDER_REFUND_NOT_EXISTS = new ErrorCode(1_025_005_000, "订单退款记录不存在");
    ErrorCode ORDER_REFUND_STATUS_INVALID = new ErrorCode(1_025_005_001, "订单退款状态无效");
    ErrorCode ORDER_REFUND_AMOUNT_INVALID = new ErrorCode(1_025_005_002, "订单退款金额无效");
    ErrorCode ORDER_REFUND_EXPIRED = new ErrorCode(1_025_005_003, "订单退款已过期");

    // ========== 订单状态流转相关 1-025-006-000 ============
    ErrorCode ORDER_STATUS_TRANSITION_INVALID = new ErrorCode(1_025_006_000, "订单状态流转无效");
    ErrorCode ORDER_CANCEL_NOT_ALLOWED = new ErrorCode(1_025_006_001, "订单不允许取消");
    ErrorCode ORDER_CONFIRM_NOT_ALLOWED = new ErrorCode(1_025_006_002, "订单不允许确认");
    ErrorCode ORDER_COMPLETE_NOT_ALLOWED = new ErrorCode(1_025_006_003, "订单不允许完成");

    // ========== 订单主表相关 1-025-007-000 ============
    ErrorCode ORDER_MAIN_NOT_EXISTS = new ErrorCode(1_025_007_000, "订单主记录不存在");

    // ========== 客户相关 1-025-008-000 ============
    ErrorCode ORDER_CUSTOMER_NOT_EXISTS = new ErrorCode(1_025_008_000, "客户不存在");




    // ========== 地址相关 1-025-009-000 ============
    ErrorCode ORDER_ADDRESS_NOT_EXISTS = new ErrorCode(1_025_009_000, "订单地址不存在");


    // ========== 发货相关 1-025-010-000 ============
    ErrorCode ORDER_SHIPMENT_NOT_EXISTS = new ErrorCode(1_025_010_000, "发货记录不存在");

    // ========== 退换货相关 1-025-011-000 ============
    ErrorCode ORDER_RETURN_NOT_EXISTS = new ErrorCode(1_025_011_000, "退换货记录不存在");
    ErrorCode ORDER_RETURN_ITEM_NOT_EXISTS = new ErrorCode(1_025_011_001, "退换货明细不存在");

    // ========== 发货明细相关 1-025-012-000 ============
    ErrorCode ORDER_SHIPMENT_ITEM_NOT_EXISTS = new ErrorCode(1_025_012_000, "发货明细不存在");

    // ========== 状态日志相关 1-025-013-000 ============
    ErrorCode ORDER_STATUS_LOG_NOT_EXISTS = new ErrorCode(1_025_013_000, "订单状态日志不存在");

    ErrorCode ORDER_CUSTOMER_ADDRESS_NOT_EXISTS = new ErrorCode(1_025_014_000, "订单客户地址不存在");

}
